package com.obixlabs.kalua.domainmodel.catalogue;

import java.util.HashMap;
import java.util.Map;

import com.obixlabs.kalua.domainmodel.NumericId;

public class CatalogueItemImpl implements CatalogueItem {
	
	private NumericId id;	
	private Map<CatalogueEditionId, NumericId> catalogueEntries; 	//edition -> category/classification
	private String name;
	private double price;
	
	
	protected CatalogueItemImpl() { 
		setCatalogueEntries(new HashMap<CatalogueEditionId, NumericId>());
	}
	
	public CatalogueItemImpl(	NumericId id,
												String name, 
												double price,
												Map<CatalogueEditionId, NumericId> catalogueEntries) {
		this();
		setId(id);
		setName(name);
		setPrice(price);
		this.catalogueEntries.putAll(catalogueEntries);
	}

	@Override
	public NumericId getId() { return this.id; }
	private void setId(NumericId id) { this.id = id; }

	@Override
	public Map<CatalogueEditionId, NumericId> getCatalogueEntries() 
	{ return this.catalogueEntries; }
	public void setCatalogueEntries(Map<CatalogueEditionId, NumericId> catalogueEntries) 
	{ this.catalogueEntries = catalogueEntries; }

	@Override
	public String getName() { return this.name; }
	private void setName(String name) { this.name = name; }

	@Override
	public double getPrice() { return this.price; }
	private void setPrice(double price) { this.price = price; }	
}//end class def